<?php
class NoBusinessBase_Utility_Guid
{
   static public function toHex($guid)
   {
      if(!is_resource($guid))
         return bin2hex($guid);

      //Currently the only streams are already storing as hex and have an 'x' at byte 0, so use offset 1 for stream_get_contents().
      return stream_get_contents($guid, -1, 1);
   }
}
